﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using tracker.Models;
using System.Reflection;
using System.Web.Mvc;
namespace tracker.Controllers
{
    public class SessionExpireFilterAttribute : ActionFilterAttribute 
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            HttpContext ctx = HttpContext.Current;

            if (ctx.Session[Common.USER] == null)
            {
              ctx.Response.Redirect("/");
            }

            base.OnActionExecuting(filterContext);

        }
    }
}
